import request from '@/utils/request'

export function login(data) {
  return request({
    url: '/auth/local',
    method: 'post',
    data
  })
}
// 获取用户信息
export function getUserInfo() {
  return request({
    url: '/users/me',
    method: 'GET'

  })
}

// 注册
export function registered(data) {
  return request({
    noToken: true,
    url: '/auth/local/register',
    method: 'POST',
    data
  })
}

// 获取当前用户权限
export function userPerm() {
  return request({
    url: '/mypermissions',
    method: 'GET'
  })
}

